/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.hbzhit.modules.act.service;

import com.hbzhit.common.utils.PageUtils;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.Map;

/**
 * @author lengleng
 * @date 2018/9/25
 */
public interface ProcessService {

    /**
     * 分页流程列表
     *
     * @param params 参数
     * @return 分页数据
     */
    PageUtils getProcessByPage(Map<String, Object> params);

    /**
     * 导入BPMN
     */
    Boolean importBPMN(MultipartFile file);

    Boolean convertToModel(String procDefId);

    /**
     * 读取xml/image资源
     *
     * @param procDefId 流程定义id
     * @param proInsId  流程实例id
     * @param resType   生成资源类型
     * @return 流对象
     */
    InputStream readResource(String procDefId, String proInsId, String resType);

    /**
     * 删除流程实例
     *
     * @param deploymentId 流程部署id
     * @return 是否执行成功
     */
    Boolean removeProcIns(String deploymentId);
}
